<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>积分商城</title>
		<link rel="stylesheet" href="../../resources/layui/css/layui.css" />
		<link rel="stylesheet" href="../../resources/css/mall.css" />
		<script type="text/javascript" src="../../resources/js/jquery-1.11.1.min.js"></script>
		<script type="text/javascript" src="../../resources/layui/layui.js"></script>
	</head>

	<body>
		<jsp:include page="/pages/common/header.jsp"></jsp:include>
		<div class="t_content">
			<img src="../../resources/images/sea_bg.png" />
			<div class="t">
				<span class="layui-icon layui-icon-add-circle"></span>
				<span class="tp">
					积分商城
				</span>
			</div>
		</div>
		<div class="main">
			<ul class="mall">
				<!--<li class="malldetails">
					<div class="t_img">
						<img src="../../resources/images/mall.jpg" />
					</div>
					<div class="f_other">
						<div class="mallname">
							<p class="text">xxxxxxx</p>
						</div>
						<div class="malldetail">
							<p class="text">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>

						</div>
						<div class="mallprice">
							<span class="p">￥</span>
							<span class="pp">1499积分</span>
						</div>
						<div class="btn_exchange">
							<span class="layui-btn layui-btn-danger exchange">立即兑换</span>
						</div>
					</div>
				</li>

				<li class="malldetails">
					<div class="t_img">
						<img src="../../resources/images/mall.jpg" />
					</div>
					<div class="f_other">
						<div class="mallname">
							<p class="text">xxxxxxx</p>
						</div>
						<div class="malldetail">
							<p class="text">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>

						</div>
						<div class="mallprice">
							<span class="p">￥</span>
							<span class="pp">1499积分</span>
						</div>
						<div class="btn_exchange">
							<span class="layui-btn layui-btn-danger exchange">立即兑换</span>
						</div>
					</div>
				</li>

				<li class="malldetails">
					<div class="t_img">
						<img src="../../resources/images/mall.jpg" />
					</div>
					<div class="f_other">
						<div class="mallname">
							<p class="text">xxxxxxx</p>
						</div>
						<div class="malldetail">
							<p class="text">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>

						</div>
						<div class="mallprice">
							<span class="p">￥</span>
							<span class="pp">1499积分</span>
						</div>
						<div class="btn_exchange">
							<span class="layui-btn layui-btn-danger exchange">立即兑换</span>
						</div>
					</div>
				</li>

				<li class="malldetails">
					<div class="t_img">
						<img src="../../resources/images/mall.jpg" />
					</div>
					<div class="f_other">
						<div class="mallname">
							<p class="text">xxxxxxx</p>
						</div>
						<div class="malldetail">
							<p class="text">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>

						</div>
						<div class="mallprice">
							<span class="p">￥</span>
							<span class="pp">1499积分</span>
						</div>
						<div class="btn_exchange">
							<span class="layui-btn layui-btn-danger exchange">立即兑换</span>
						</div>
					</div>
				</li>

				<li class="malldetails">
					<div class="t_img">
						<img src="../../resources/images/mall.jpg" />
					</div>
					<div class="f_other">
						<div class="mallname">
							<p class="text">xxxxxxx</p>
						</div>
						<div class="malldetail">
							<p class="text">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>

						</div>
						<div class="mallprice">
							<span class="p">￥</span>
							<span class="pp">1499积分</span>
						</div>
						<div class="btn_exchange">
							<span class="layui-btn layui-btn-danger exchange">立即兑换</span>
						</div>
					</div>
				</li>-->
			
			</ul>
				<div style="clear: both;">

				</div>
		</div>

		<jsp:include page="/pages/common/footer.jsp"></jsp:include>
		<script>
			layui.use('layer', function() {
				var layer = layui.layer;
				//				layer.msg('兑换  function');

				$(".exchange").click(function() {
					layer.msg('兑换  function',{icon: 1});
				});
			});
		</script>
	</body>

	
	<script >
//	var userid = ${sessionScope.userId};
		$.ajax({
			type:"post",
			url:"/goods/queryPagingGoods.action",
//			data:{
//				"users.userId":userid
//			},
			dataType:'Json',
			success:function(data){
				$.each(data.data,function(index,item){
					
					var a = "<li class='malldetails'><div class='t_img'><img src="+item.goodsUrl+" /></div><div class='f_other'>";
					a += "<div class='mallname'><p class='text'>"+item.goodsName+"</p></div><div class='malldetail'><p class='text'>剩余："+item.goodsScore+"</p></div>";	
					a += "<div class='mallprice'><span class='p'>￥</span><span class='pp'>"+item.goodsIntegral+"</span></div><div class='btn_exchange'><span class='layui-btn layui-btn-danger exchange'>立即兑换</span></div></div></li>";	
					$(".mall").append(a);
				});
			}
			
		})	
	</script>
	

</html>